<!--{include(pe_tpl('header.html'));}-->
<div class="right" style="background:#fff">
	<div class="now">
		<a href="admin.php?mod=order" <!--{if($act=='index' && !$_g_state):}-->class="sel"<!--{endif;}-->>全部订单（{intval($tongji['all'])}）</a>
		<a href="admin.php?mod=order&state=notpay" <!--{if($act=='index' && $_g_state=='notpay'):}-->class="sel"<!--{endif;}-->>等待买家付款（{intval($tongji['notpay'])}）</a>
		<a href="admin.php?mod=order&state=paid" <!--{if($act=='index' && $_g_state=='paid'):}-->class="sel"<!--{endif;}-->>等待发货（{intval($tongji['paid'])}）</a>
		<a href="admin.php?mod=order&state=send" <!--{if($act=='index' && $_g_state=='send'):}-->class="sel"<!--{endif;}-->>已发货（{intval($tongji['send'])}）</a>
		<a href="admin.php?mod=order&state=success" <!--{if($act=='index' && $_g_state=='success'):}-->class="sel"<!--{endif;}-->>交易成功（{intval($tongji['success'])}）</a>
		<a href="admin.php?mod=order&state=close" <!--{if($act=='index' && $_g_state=='close'):}-->class="sel"<!--{endif;}-->>交易关闭（{intval($tongji['close'])}）</a>
		<div class="clear"></div>
	</div>
	<div class="search">
		<form method="get">
			<input type="hidden" name="mod" value="{$_g_mod}" />
			<input type="hidden" name="state" value="{$_g_state}" />
			订单编号：<input type="text" name="id" value="{$_g_id}" class="inputtext input100 mar10" />
			姓名：<input type="text" name="user_tname" value="{$_g_user_tname}" class="inputtext input60 mar10" />
			电话：<input type="text" name="user_phone" value="{$_g_user_phone}" class="inputtext input80 mar10" />
			帐号：<input type="text" name="user_name" value="{$_g_user_name}" class="inputtext input80 mar10" />
			下单时间：<input type="text" name="date1" value="{$_g_date1}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate inputtext" style="width:90px;height:20px;" />	
			至 <input type="text" name="date2" value="{$_g_date2}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate inputtext" style="width:90px;height:20px;" />			
			<input type="submit" value="搜索" class="input2" />
		</form>
	</div>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list">
	<tr>
		<th class="bgtt" style="border-bottom:0;" width="">商品详情</th>
		<th class="bgtt" style="border-bottom:0;" width="95">实付款(元)</th>
		<th class="bgtt" style="border-bottom:0;" width="245">收货信息</th>
		<th class="bgtt" style="border-bottom:0;" width="50">支付状态</th>
		<th class="bgtt" style="border-bottom:0;" width="50">配送状态</th>
		<th class="bgtt" style="border-bottom:0;" width="85">交易操作</th>
	</tr>
	</table>
	<!--{foreach($info_list as $k=>$v):}-->
	<!--{$sel = in_array($v['order_state'], array('success', 'close')) ? 'hy_ordertw' : 'hy_ordertt'}-->
	<!--{$order_state = order_state($v)}-->
	<div class="{$sel} c666 <!--{if($k>0):}-->mat10<!--{endif;}-->">
		订单编号：<span class="num">{$v['order_id']}</span>
		<span style="margin-left:60px">下单时间：<span class="num5 c333">{pe_date($v['order_atime'])}</span></span>
	</div>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="hy_orderlist">
	<tr>
		<td class="aleft">
			<!--{foreach($v['product_list'] as $kk => $vv):}-->
			<div class="dingdan_list" <!--{if($kk==0):}-->style="padding-top:0"<!--{endif;}-->>
				<a href="{pe_url('product-'.$vv['product_id'])}" class="fl mar5" target="_blank"><img src="{pe_thumb($vv['product_logo'], 40, 40)}" width="40" height="40" class="imgbg" /></a>
				<div class="fl">
					<a href="{pe_url('product-'.$vv['product_id'])}" title="{$vv['product_name']}" target="_blank" class="cblue dd_name">{$vv['product_name']}</a>
					<!--{if($vv['prorule_name']):}-->
					<p class="c888 mat5"><!--{foreach(unserialize($vv['prorule_name']) as $vvv):}-->[{$vvv['name']}：{$vvv['value']}]&nbsp;&nbsp;<!--{endforeach;}--></p>
					<!--{endif;}-->
				</div>
				<span class="fr"><span class="num">{$vv['product_money']}</span>(×{$vv['product_num']})</span>
				<div class="clear"></div>
			</div>
			<!--{endforeach;}-->
		</td>
		<td width="90">
			<p class="corg num strong">{$v['order_money']}</p>
			<p class="c999 num">(含运费：{$v['order_wl_money']})</p>
			<p class="c888">{$ini['payway'][$v['order_payway']]}</p>
		</td>
		<td width="250" class="aleft" valign="top" style="padding:5px;color:#555">
			<p>【姓名】{$v['user_tname']} <span class="c888">({$v['user_phone']})</span></p>
			<p>【地址】{$v['user_address']}</p>
			<p>【留言】<span class="c888">{$v['order_text']}</span></p>
		</td>
		<td width="45"><!--{if($v['order_ptime']):}-->已付款<!--{else:}--><span class="cred">未付款</span><!--{endif;}--></td>
		<td width="45"><!--{if($v['order_stime']):}-->已发货<!--{else:}--><span class="cred">未发货</span><!--{endif;}--></td>
		<td width="90" style="padding:5px; border-right:0;">
			<!--{if($order_state == 'notpay'):}-->
			<p class="cred">等待买家付款</p>
			<p class="mat3"><a class="tag_org" href="admin.php?mod=order&act=pay&id={$v['order_id']}" onclick="return pe_dialog(this, '订单付款', 550, 300, 'order_pay')">立即付款</a></p>
			<!--{elseif($order_state == 'paid'):}-->
			<p class="cred">等待发货</p>
			<p class="mat3"><a class="tag_blue" href="admin.php?mod=order&act=send&id={$v['order_id']}" onclick="return pe_dialog(this, '填写发货信息', 550, 390, 'order_send')">发 货</a></p>
			<!--{elseif($order_state == 'send'):}-->
			<p class="cred">卖家已发货</p>
			<p class="mat3"><a class="tag_green" href="admin.php?mod=order&act=success&id={$v['order_id']}&token={$pe_token}" onclick="return pe_cfone(this, '收货')">确认收货</a></p>
			<!--{elseif($order_state == 'success'):}-->
			<p class="cgreen">交易成功</p>
			<!--{elseif($order_state == 'close'):}-->
			<strike class="c999">交易关闭</strike>
			<!--{endif;}-->
			<p class="mat3">
				<a href="admin.php?mod=order&act=edit&id={$v['order_id']}" target="_blank" class="cblue">详情</a>
				<!--{if($order_state == 'close'):}-->
				| <a href="admin.php?mod=order&act=del&id={$v['order_id']}&token={$pe_token}" onclick="return pe_cfone(this, '删除订单')" class="c999">删除</a>
				<!--{elseif($order_state != 'success'):}-->
				| <a href="admin.php?mod=order&act=close&id={$v['order_id']}" onclick="return pe_dialog(this, '关闭订单', 550, 390, 'order_close')" class="c999">关闭</a>
				<!--{endif;}-->
			</p>
		</td>
	</tr>
	</table>
	<!--{endforeach;}-->
	<div class="hy_pay"><div class="fenye">{$db->page->html}</div></div>
</div>
<script type="text/javascript" src="{$pe['host_root']}include/plugin/my97/WdatePicker.js"></script>
<script charset="utf-8" src="{$pe['host_root']}include/plugin/artdialog/jquery.artDialog.js?skin=chrome"></script>
<script charset="utf-8" src="{$pe['host_root']}include/plugin/artdialog/plugins/iframeTools.js"></script>
<!--{include(pe_tpl('footer.html'));}-->